package springboot.demo.component;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;
import springboot.demo.model.Student;

@Component
public class StudentComponent {

    @Bean({"s6,s7"})
    public Student s1(){
        return new Student("Tom",12);
    }

    public String name(){
        return "jerry";
    }

    public String name1(){
        return "cat";
    }

    public Student s2(@Qualifier("name") String n){
        return new Student(n, 18);
    }
}
